<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <link href="http://netdna.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.css" rel="stylesheet">
    <script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.js"></script>
    <script src="http://netdna.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.js"></script>

    <link href="/css/sum/summernote.css" rel="stylesheet">
    <script src="/css/sum/summernote.js"></script>
    <link rel="stylesheet" type="text/css" href="/css/reset.css">
    <link rel="stylesheet" href="/css/mui/css/mui.min.css">
    <link rel="stylesheet" type="text/css" href="/css/iconfont.css">
    <link rel="stylesheet" type="text/css" href="/css/common.css">
    <title><%= title %></title>
  </head>
  <body>
    <div class="header_fixed">
      <div class="h_btn_left" onclick="javascript:history.go(-1)">
        <i class="icon-fanhui"></i>返回
      </div>
      <div class="h_btn_right" onclick="save_note(this)" data-id="<%= data['datas']['id'] %>">
        保存
      </div>
    </div>

    <div class="mui-content">

      <div class="mui-input-row">
				<label>标题</label>
				<input id="title" type="text" class="mui-input-clear" placeholder="输入标题" value="<%= data['datas']['title'] %>">
			</div>

      <ul id="cs_note_lists" class="mui-table-view cs-slider-list">
        <%- util.str2html(data['datas']['contents']['contents']) %>
      </ul>
    </div>




    <!-- <div class="cs_main">
      <div class="cs_edit_box">
        <input type="text" placeholder="标题" id="title" value="<%= data['datas']['title'] %>">
        <div id="note_contents">

        </div>



        <div class="audio_box"></div>
      </div>

    </div> -->
    <div class="add_text">
      <div class="header_fixed">
        <div class="h_btn_left" onclick="hide_addtxt()">
          <i class="icon-fanhui"></i>返回
        </div>
        <div class="h_btn_right" id="add_btn" onclick="add_txt()">
          确定
        </div>
      </div>
      <div class="add_text_box">
        <!-- <textarea class="add_t" id="add_t"></textarea> -->
        <div id="summernote"></div>
      </div>
    </div>
    <div class="footer_fixed">
      <div class="footer_item part_3">
        <i class="icon-xiangji"></i>
      </div>
      <div class="footer_item part_3" onclick="show_addtxt()">
        <i class="icon-wenzi"></i>
      </div>
      <div class="footer_item part_3">
        <i class="icon-yuyin"></i>
      </div>
    </div>
    <!-- <script src="/js/zepto.js" charset="utf-8"></script> -->
    <script src="/js/function.js" charset="utf-8"></script>

    <script src="/css/mui/js/mui.min.js" charset="utf-8"></script>
    <script type="text/javascript">
      mui.init();
      (function($) {
  				$('#cs_note_lists').on('tap', '.mui-btn', function(event) {
    					var elem = this;
    					var li = elem.parentNode.parentNode;
    					mui.confirm('确认删除该条记录？', 'SG云笔记', btnArray, function(e) {
    						if (e.index == 0) {
    							li.parentNode.removeChild(li);
                  add_edit_listen ();
    						} else {
    							setTimeout(function() {
    								$.swipeoutClose(li);
    							}, 0);
    						}
    					});
    				});
    				var btnArray = ['确认', '取消'];
    			})(mui);


      $(function(){


        $(document).ready(function() {
          $('#summernote').summernote();
          add_edit_listen ();
        });

      });


    </script>
  </body>
</html>
